package cn.cuilan.service;

import cn.cuilan.entity.PositionCountry;
import cn.cuilan.repository.PositionCountryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 国家服务层实现类
 *
 * @author zhangyue
 */
@Service
public class PositionCountryService {

    private final PositionCountryRepository positionCountryRepository;

    @Autowired
    public PositionCountryService(PositionCountryRepository positionCountryRepository) {
        this.positionCountryRepository = positionCountryRepository;
    }

    /**
     * 获取所有的国家
     *
     * @return 地理位置国家集合
     */
    public List<PositionCountry> findAllPositionCountry() {
        return (List<PositionCountry>) positionCountryRepository.findAll();
    }

}
